package immutablecollections.functions;

/**
 * A function that takes two argument and returns a value of type O
 */
public interface Function2<O>
{
    /**
     * Supply the argument `arg` to `this`, returning a one-argument function.
     */
    Function1<O> invoke(Object arg);

    /**
     * Create a function that is the same as `this` but with the order of the arguments reversed.
     */
    Function2<O> flip();
}
